﻿<!doctype html public '-//W3C//DTD HTML 4.0 Transitional //EN'>
<html>
<head>
<title>AspBox帮助文档</title>
<meta charset='UTF-8' />
<meta name='generator' content='EverEdit' />
<link href='statics/default.css' rel='stylesheet'></link>
<link href='statics/prettify.css' rel='stylesheet'></link>
<script type='text/javascript' src='statics/prettify.js'></script>
<script type='text/javascript' src='statics/jquery-1.10.2.min.js'></script>
<script type='text/javascript' src='statics/code.js'></script>
</head>
<body>
<h1>AspBox A 核心</h1>

<table>
    <tr>
        <td>文件：</td>
        <td>ab.a.asp</td>
    </tr>
    <tr>
        <td>类名：</td>
        <td>Class Cls_AB_A</td>
    </tr>
</table>

<hr />

<p><strong>AB.A.Max() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>n = AB.A.Max(arr)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>取出数组元素最大值(所有数组元素均须为数字类型)</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>Array arr          数组</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>ab.c.print AB.A.Max(array(1, 5.5, 3.2)) &#8217;=> 5.5</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[数字类型]</p>
</blockquote>

<hr />

<p><strong>AB.A.Min() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>n = AB.A.Min(arr)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>取出数组元素最小值(所有数组元素均须为数字类型)</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>Array arr          数组</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>ab.c.print AB.A.Min(array(1, 5.5, 3.2)) &#8217;=> 1</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[数字类型]</p>
</blockquote>

<hr />

<p><strong>AB.A.Sum() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>n = AB.A.Sum(arr)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>计算所有数组元素相加总和</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>Array arr          数组</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>ab.c.print AB.A.Sum(array(1, 2.5, 1.6)) &#8217;=> 5.1</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[数字类型]</p>
</blockquote>

<hr />

<p><strong>AB.A.Avg() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>n = AB.A.Avg(arr)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>计算所有数组元素的平均数</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>Array arr          数组</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>ab.c.print AB.A.Avg(array(1, 2.5, 1.6)) &#8217;=> 1.7</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[数字类型]</p>
</blockquote>

<hr />

<p><strong>AB.A.First() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>n = AB.A.First(arr)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>取得数组第一个元素值</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>Array arr          数组</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>Dim o : Set o = AB.Dict '字典对象
      ab.trace AB.A.First(array("abcd", o, 5)) '=> "abcd"
      Dim x : Set x = AB.A.First(array(o, "abcd", 5)) '=> 对象 o
      AB.Trace x</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>若参数为空数组或非数组则返回空值</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[Anything (任意值)]</p>
</blockquote>

<hr />

<p><strong>AB.A.End() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>n = AB.A.End(arr)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>取得数组最后一个元素值</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>Array arr          数组</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>Dim o : Set o = AB.Dict '字典对象
      ab.trace AB.A.First(array("abcd", o, 5)) '=> 5
      Dim x : Set x = AB.A.End(array("abcd", 5, o)) '=> 对象 o
      AB.Trace x</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>若参数为空数组或非数组则返回空值</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[Anything (任意值)]</p>
</blockquote>

<hr />

<p><strong>AB.A.Clone() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>newArr = AB.A.Clone(arr)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>实现数组的克隆(拷贝)</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>Array arr          (原数组)</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>dim a1, a2
      a1 = array("a","b","c")
      a2 = array("x","y",3)
      a2 = ab.a.clone(a1)
      ab.trace(a2) '=> Array("a","b","c")</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>对数组 arr 进行克隆，生成新数组(动态数组,可随时新增元素)</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[Array (数组)]</p>
</blockquote>

<hr />

<p><strong>AB.A.UnShift() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>newArr = AB.A.UnShift(arr, var)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>向数组中从前压入元素</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>Array arr           数组
      MixType var         新元素</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>ab.trace ab.a.UnShift(array(&#8221;a&#8221;, &#8220;b&#8221;, &#8220;c&#8221;), &#8220;d&#8221;) &#8217;=> Array(&#8221;d&#8221;, &#8220;a&#8221;, &#8220;b&#8221;, &#8220;c&#8221;)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>向数组中从前压入新元素(即新元素为新数组的第一个元素)，生成新数组</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[Array (数组)]</p>
</blockquote>

<hr />

<p><strong>AB.A.Shift() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>newArr = AB.A.Shift(arr)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>向数组中从前删除第一个元素</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>Array arr             数组</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>ab.trace ab.a.Shift(array(&#8221;a&#8221;, &#8220;b&#8221;, &#8220;c&#8221;, &#8220;d&#8221;)) &#8217;=> Array(&#8221;b&#8221;, &#8220;c&#8221;, &#8220;d&#8221;)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>向数组中从前删除元素，即删除数组的第一个元素，生成新数组</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[Array (数组)]</p>
</blockquote>

<hr />

<p><strong>AB.A.Push() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>newArr = AB.A.Push(arr, var)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>向数组中从后压入元素</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>Array arr           数组
      MixType var         新元素</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>ab.trace ab.a.Push(array(&#8221;a&#8221;, &#8220;b&#8221;, &#8220;c&#8221;), &#8220;d&#8221;) &#8217;=> Array(&#8221;a&#8221;, &#8220;b&#8221;, &#8220;c&#8221;, &#8220;d&#8221;)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>向数组中从前删除元素，即删除数组的第一个元素，生成新数组</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[Array (数组)]</p>
</blockquote>

<hr />

<p><strong>AB.A.Pop() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>newArr = AB.A.Pop(arr)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>向数组中从后删除最后一个元素</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>Array arr             数组</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>ab.trace ab.a.Pop(array(&#8221;a&#8221;, &#8220;b&#8221;, &#8220;c&#8221;, &#8220;d&#8221;)) &#8217;=> Array(&#8221;a&#8221;, &#8220;b&#8221;, &#8220;c&#8221;)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>向数组中从后删除最后一个元素，生成新数组</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[Array (数组)]</p>
</blockquote>

<hr />

<p><strong>AB.A.Strip() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>arr = AB.A.Strip(str)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>返回以(,)分割成的数组</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>String str            字符串</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>ab.trace ab.a.Strip(&#8221;a,b,c,d,&#8221;) &#8217;=> Array(&#8221;a&#8221;, &#8220;b&#8221;, &#8220;c&#8221;, &#8220;d&#8221;)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>去除字符串最右边和最左边的(,)符号,并返回以(,)分割成的数组
      去除如(1,2,3,)或(,1,2,3)最右边和最左边的(,)符号,并返回以(,)分割成的数组</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[Array (数组)]</p>
</blockquote>

<hr />

<p><strong>AB.A.Walk() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>newArr = AB.A.Walk(arr, f)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>对数组内元素执行函数后返回新数组</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>Array arr           数组
      [string | mix-array] : (字符串 或 混合型数组)
      参数f是字符串，为要执行的函数名
      参数f是数组，则第一个元素为要执行的函数名，第二个元素做为执行函数的第二个以上参数数组</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>ab.trace ab.a.Walk(array("ab", "cde", "fghi"), "len") '=> Array(2, 3, 4)
      ab.trace ab.a.Walk(array("ab", "cde", "fghi"), array("len")) '=> Array(2, 3, 4)
      Function foo(a, b, c) : foo = a + b + c : End Function
      ab.trace ab.a.Walk(array(1, 2, 3), array("foo", array(2, 3)) ) '=> Array(6, 7, 8)</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[Array (数组)]</p>
</blockquote>

<hr />

<p><strong>AB.A.Sub() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>newArr = AB.A.Sub(arr, start, over)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>截取元素(按索引范围)</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>Array arr           数组
      Integer start       start index
      Integer over        over index
      当结束索引 over 值为-1时, 表示截取元素范围从开始索引 index 开始直到结束。</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>ab.trace ab.a.Sub(array("a","b","c","d"), 0, 0) '=> Array("a")
      ab.trace ab.a.Sub(array("a","b","c","d"), 1, 2) '=> Array("b", "c")
      ab.trace ab.a.Sub(array("a","b","c","d"), -1, 2) '=> Array("a","b","c")
      ab.trace ab.a.Sub(array("a","b","c","d"), 0, -1) '=> Array("a", "b", "c", "d")</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>(根据索引范围:从开始索引 start 到 结束索引 over)从一个数组中截取一部分元素(一个或多个)并返回新数组</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[Array (数组)]</p>
</blockquote>

<hr />

<p><strong>AB.A.Slice() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>newArr = AB.A.Slice(arr, start, length)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>截取元素(从起始索引按长度截取)</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>Array arr           数组
      Integer start       start index
      Integer over        over index
      当结束索引 over 值为-1时, 表示截取元素范围从开始索引 index 开始直到结束。</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>ab.trace ab.a.Slice(array("a","b","c","d"), 1, 2) '=> Array("b", "c")
      ab.trace ab.a.Slice(array("a","b","c","d"), 2, 5) '=> Array("c", "d")
      ab.trace ab.a.Slice(array("a","b","c","d"), 0, 2) '=> Array("a", "b")
      ab.trace ab.a.Slice(array("a","b","c","d"), 0, 0) '=> Array("a", "b", "c", "d")
      ab.trace ab.a.Slice(array("a","b","c","d","e"), 3, -2) '=> Array("d", "c", "b")</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>(根据指定的索引范围)从一个数组中截取一部分元素(一个或多个)并返回新数组
      start>=0时,为正常截取(从索引值为start处开始截取)返回数组
      strat&lt;0时,从索引值[数组长度m-(-strat)处]开始截取返回数组
      length>0时,从索引值start处开始截取到start+length处截取返回数组
      length=0时,从索引值start处开始截取到结束截取返回数组
      length&lt;0时,从索引值start处开始向左截取到start-(-length)结束截取返回数组</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[Array (数组)]</p>
</blockquote>

<hr />

<p><strong>AB.A.Splice() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>newArr = AB.A.Splice(arr, start, length)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>移除数组部分元素(根据指定的索引范围)</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>Array arr           数组
      Integer start       start index
      Integer length      length
      当start=0 和 length=0 时，返回空数组。</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>ab.trace ab.a.Splice(array("a","b","c","d"), 1, 2) '=> Array("a", "d")
      ab.trace ab.a.Splice(array("a","b","c","d"), 2, 5) '=> Array("a", "b")
      ab.trace ab.a.Splice(array("a","b","c","d"), 0, 2) '=> Array("c", "d")
      ab.trace ab.a.Splice(array("a","b","c","d"), 0, 0) '=> Array()
      ab.trace ab.a.Splice(array("a","b","c","d","e"), 3, -1) '=> Array("a", "b", "e")</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>(根据指定的索引范围)从一个数组中移除一部分元素(一个或多个)并返回新数组
      start>=0时,为正常(从索引值为start处开始)部分删除后返回的数组
      start&lt;0时,从索引值[数组长度m-(-start)处]开始部分删除后返回的数组
      length>0时,从索引值start处开始到start+length处截取返回的数组
      length=0时,从索引值start处开始到结束部分删除后返回的数组
      length&lt;0时,从索引值start处开始向左到start-(-length)结束部分删除后返回的数组</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[Array (数组)]</p>
</blockquote>

<hr />

<p><strong>AB.A.SpliceX() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>newArr = AB.A.SpliceX(arr, start, length, elem)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>替换数组部分元素(根据指定的索引范围)</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>Array arr           数组
      Integer start       start index
      Integer length      length
      MixType elem        [Array | Object|String|Other.. | Null] 填充元素
      当 elem参数 为 Array 时, 表示填充批量元素组
      当 elem参数 为 Object|String|Other.. 时, 表示填充单个元素
      当 elem参数 为 null 时, 不填充元素, 等效于 AB.A.Splice(arr, start, length) 方法</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>ab.trace ab.a.SpliceX(array("a","b","c","d"), 1, 2, array("x","y")) '=> Array("a", "x", "y", "d")
      ab.trace ab.a.SpliceX(array("a","b","c","d"), 2, 5, array("x","y")) '=> Array("a", "b", "x", "y")
      ab.trace ab.a.SpliceX(array("a","b","c","d"), 0, 2, array("x","y")) '=> Array("x", "y", "c", "d")
      ab.trace ab.a.SpliceX(array("a","b","c","d"), 0, 0, array("x","y")) '=> Array("x", "y")
      ab.trace ab.a.SpliceX(array("a","b","c","d","e"), 3, -1, array("x","y")) '=> Array("a", "b", "x", "y", "e")
      ab.trace ab.a.SpliceX(array("a","b","c","d","e"), -1, 0, "x") '=> Array("a","b","c","d","x")
      ab.trace ab.a.Concat(array("a","b","c","d","e"), array("x","y")) '=> Array("a","b","c","d","e","x","y")
      ab.trace ab.a.Fill(array("a","b","c","d","e"), 1, "x") '=> Array("a","x","b","c","d","e")
      ab.trace ab.a.Fill(array("a","b","c","d","e"), 1, Array("x","y")) '=> Array("a","x","y","b","c","d","e")</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>(根据指定的索引范围)从一个数组中将一部分元素(一个或多个)用填充元素代替并返回新数组
      start>=0时,为正常(从索引值为start处开始)部分删除后返回的数组
      start&lt;0时,从索引值[数组长度m-(-start)处]开始部分删除后返回的数组
      length>0时,从索引值start处开始到start+length处截取返回的数组
      length=0时,从索引值start处开始到结束部分删除后返回的数组
      length&lt;0时,从索引值start处开始向左到start-(-length)结束部分删除后返回的数组</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[Array (数组)]</p>
</blockquote>

<hr />

<p><strong>AB.A.Fill() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>newArr = AB.A.Fill(arr, index, elem)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>插入元素到数组（填充数组）</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>Array arr           数组
      Integer index       索引
      MixType elem        [Array | Object|String|Other.. | Null] 填充元素
      当 elem参数 为 Array 时, 表示填充批量元素组
      当 elem参数 为 Object|String|Other.. 时, 表示填充单个元素</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>ab.trace ab.a.Fill(array("a", "b", "c"), 1, "d") '=> Array("a", "d", "b", "c")
      ab.trace ab.a.Fill(array("a", "b", "c"), 5, "d") '=> Array("a", "b", "c", "", "", "d")
      ab.trace ab.a.Fill(array("a", "b", "c"), -2, "d") '=> Array("d", "", "a", "b", "c")</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>插入元素到数组（填充数组）
      当 elem参数 为 Array 时, 表示填充批量元素组
      当 elem参数 为 Object|String|Other.. 时, 表示填充单个元素</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[Array (数组)]</p>
</blockquote>

<hr />

<p><strong>AB.A.Concat() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>newArr = AB.A.Concat(arr1,arr2)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>将两个数组合并成一个数组(新数组)</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>Array arr1          数组
      Array arr2          数组</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>ab.trace ab.a.Concat(array("a","b","c"), array("c","d")) '=> Array("a","b","c","c","d")
      ab.trace ab.a.Concat(array("a","","","b"), array("d","","e")) '=> Array("a","","","b","d","","e")</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[Array (数组)]</p>
</blockquote>

<hr />

<p><strong>AB.A.Merge() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>newArr = AB.A.Merge(arr1,arr2)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>将两个数组合并成一个数组且交叉部分(相同元素部分)只保留一个(新数组)</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>Array arr1          数组
      Array arr2          数组</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>ab.trace ab.a.Merge(array("a","b","c"), array("c","d")) '=> Array("a","b","c","d")
      ab.trace ab.a.Merge(array("a","","","b"), array("d","","e")) '=> Array("a","","","b","d","e")</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[Array (数组)]</p>
</blockquote>

<hr />

<p><strong>AB.A.Cover() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>newArr = AB.A.Cover(arr1,arr2)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>由后面的数组arr2覆盖前面的数组arr1，成为新的数组</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>Array arr1          数组
      Array arr2          数组</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>ab.trace ab.a.cover(array("a","b","c"), array("d","e","f")) '=> Array("d","e","f")
      ab.trace ab.a.cover(array("a","b"), array("c","d","e")) '=> Array("c","d","e")
      ab.trace ab.a.cover(array("a","b","c"), array("d","e")) '=> Array("d","e","c")</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>由后面的数组arr2覆盖前面的数组arr1。
      当arr2数组元素个数不足arr1，保留arr1超过arr2上标部分
      当arr2数组元素个数超过arr1，函数返回arr2数组</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[Array (数组)]</p>
</blockquote>

<hr />

<p><strong>AB.A.Remove() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>newArr = AB.A.Remove(arr, elem)</p>
</blockquote>

<p><em>别名</em></p>

<blockquote>
  <p>newArr = AB.A.Del(arr, elem)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>按指定值移除数组元素</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>Array arr           数组
      MixType elem        要移除的元素值</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>ab.trace ab.a.del(array(&#8221;a&#8221;, &#8220;b&#8221;, &#8220;c&#8221;, &#8220;b&#8221;),&#8221;b&#8221;) &#8217;=> Array(&#8221;a&#8221;, &#8220;c&#8221;)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>由后面的数组arr2覆盖前面的数组arr1。
      当arr2数组元素个数不足arr1，保留arr1超过arr2上标部分
      当arr2数组元素个数超过arr1，函数返回arr2数组</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[Array (数组)]</p>
</blockquote>

<hr />

<p><strong>AB.A.Unset() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>newArr = AB.A.Unset(arr, index)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>按指定索引移除数组元素</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>Array arr           数组
      Integer index       索引</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>ab.trace ab.a.unset(array(&#8221;a&#8221;, &#8220;b&#8221;, &#8220;c&#8221;, &#8220;b&#8221;),1) &#8217;=> Array(&#8221;a&#8221;, &#8220;c&#8221;, &#8220;b&#8221;)</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[Array (数组)]</p>
</blockquote>

<hr />

<p><strong>AB.A.Unique() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>newArr = AB.A.Unique(arr)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>移除重复(多余)的元素</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>Array arr             数组</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>ab.trace ab.a.Unique(array(&#8221;a&#8221;, &#8220;b&#8221;, &#8220;c&#8221;, &#8220;b&#8221;)) &#8217;=> Array(&#8221;a&#8221;, &#8220;b&#8221;, &#8220;c&#8221;)</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[Array (数组)]</p>
</blockquote>

<hr />

<p><strong>AB.A.Reverse() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>newArr = AB.A.Reverse(arr)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>数组元素反向排序（翻转数组）</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>Array arr             数组</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>ab.trace ab.a.Reverse(array(&#8221;a&#8221;, &#8220;b&#8221;, &#8220;c&#8221;, &#8220;d&#8221;)) &#8217;=> Array(&#8221;d&#8221;, &#8220;c&#8221;, &#8220;b&#8221;, &#8220;a&#8221;)</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[Array (数组)]</p>
</blockquote>

<hr />

<p><strong>AB.A.Range() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>newArr = AB.A.Range(low, high, step)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>建立一个包含指定范围单元的数组</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>Array arr           数组
      Integer low         从low开始
      Integer high        到high结束
      Integer step        (数字 或 空值) 作为单元之间的步进值，step 应该为正值。
                          如果step值未指定(值为空)，则默认为 1</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>ab.trace ab.a.range(2, 5, 1) '=> Array(2, 3, 4, 5)
      ab.trace ab.a.range(1, 6, 2) '=> Array(1, 3, 5)
      ab.trace ab.a.range(6, 1, 2) '=> Array(6, 4, 2)
      ab.trace ab.a.range(6, 1, -2) '=> Array(6, 4, 2) '步进值虽为-2 实际上可理解为步退值2
      ab.trace ab.a.range("a", "e", 1) '=> Array("a", "b", "c", "d", "e")
      ab.trace ab.a.range("F", "A", 2) '=> Array("F","D","B") 即对于有序的ABCDEFG从F倒序到A,步阶为2</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>建立一个包含指定范围单元的数组, 步进值默认为 1
      返回数组中从 low 到 high 的单元，包括它们本身;
      如果 low > high，则序列将从 high 到 low
      如果 low > high，则序列将从 high 到 low</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[Array (数组)]</p>
</blockquote>

<hr />

<p><strong>AB.A.Rand() 方法</strong></p>

<p><em>语法</em></p>

<blockquote>
  <p>newArr = AB.A.Rand(arr, num)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>对数组进行乱序组合新的数组，可定义新数组元素个数</p>
</blockquote>

<p><em>参数</em></p>

<blockquote>
  <p>Array arr           数组
      Integer num         新数组的元素个数</p>
</blockquote>

<p><em>举例</em></p>

<blockquote>
  <p>ab.trace ab.a.Rand(array(&#8221;a&#8221;, &#8220;b&#8221;, &#8220;c&#8221;), 5) &#8217;=> Array(&#8221;a&#8221;, &#8220;a&#8221;, &#8220;c&#8221;, &#8220;a&#8221;, &#8220;c&#8221;)</p>
</blockquote>

<p><em>说明</em></p>

<blockquote>
  <p>对数组进行乱序组合新的数组，可定义新数组元素个数</p>
</blockquote>

<p><em>返回值</em></p>

<blockquote>
  <p>[Array (数组)]</p>
</blockquote>

<hr />
<script type='text/javascript'>
$(document).ready(function(){
  if($('code').length>0){
    $('code').parent().addClass('prettyprint');
    prettyPrint();
};
});
</script>
</body>
</html>